import axios from '@/http'

export default {

    getUser(datalist) {
        return axios.get(`users`,datalist)
    },

    getRole() {
        return axios.get(`roles`)
    },

    roles(id,cid) {
        return axios.put(`users/${id}/role`,cid)
    },

    redact(id,datalist) {
        return axios.put(`users/${id}`,datalist)
    },

    changes(id,datalist) {
        return axios.put(`users/${id}/state/${datalist}`)
    },

    addUsera(datalist) {
        return axios.post(`users`,datalist)
    },

    remove(id) {
        return axios.delete(`users/${id}`)
    },


}

